﻿Public Class Admin

    Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click

    End Sub

    Public Sub Block1()
        If cboBlock1Choice.Text = "Enabled" Then
            MainForm.Block1ToolStripMenuItem.Enabled = True
        End If
        If cboBlock1Choice.Text = "Disabled" Then
            MainForm.Block1ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block2()
        If cboBlockTwoChoice.Text = "Enabled" Then
            MainForm.Block2ToolStripMenuItem.Enabled = True
        End If
        If cboBlockTwoChoice.Text = "Disabled" Then
            MainForm.Block2ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block3()
        If cboBlockThreeChoice.Text = "Enabled" Then
            MainForm.Block3ToolStripMenuItem.Enabled = True
        End If
        If cboBlockThreeChoice.Text = "Disabled" Then
            MainForm.Block3ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block4()
        If cboBlockFourChoice.Text = "Enabled" Then
            MainForm.Block4ToolStripMenuItem.Enabled = True
        End If
        If cboBlockFourChoice.Text = "Disabled" Then
            MainForm.Block4ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block5()
        If cboBlockFiveChoice.Text = "Enabled" Then
            MainForm.Block5ToolStripMenuItem.Enabled = True
        End If
        If cboBlockFiveChoice.Text = "Disabled" Then
            MainForm.Block5ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block6()
        If cboBlockSixChoice.Text = "Enabled" Then
            MainForm.Block6HToolStripMenuItem.Enabled = True
        End If
        If cboBlockSixChoice.Text = "Disabled" Then
            MainForm.Block6HToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block7()
        If cboBlockSevenChoice.Text = "Enabled" Then
            MainForm.Block7HToolStripMenuItem.Enabled = True
        End If
        If cboBlockSevenChoice.Text = "Disabled" Then
            MainForm.Block7HToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block8()
        If cboBlockEightChoice.Text = "Enabled" Then
            MainForm.Block8HToolStripMenuItem.Enabled = True
        End If
        If cboBlockEightChoice.Text = "Disabled" Then
            MainForm.Block8HToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block9()
        If cboBlockNineChoice.Text = "Enabled" Then
            MainForm.Block9HToolStripMenuItem.Enabled = True
        End If
        If cboBlockNineChoice.Text = "Disabled" Then
            MainForm.Block9HToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block10()
        If cboBlockTenChoice.Text = "Enabled" Then
            MainForm.Block10HToolStripMenuItem.Enabled = True
        End If
        If cboBlockTenChoice.Text = "Disabled" Then
            MainForm.Block10HToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block11()
        If cboBlockElevenChoice.Text = "Enabled" Then
            MainForm.Block11ToolStripMenuItem.Enabled = True
        End If
        If cboBlockElevenChoice.Text = "Disabled" Then
            MainForm.Block11ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Public Sub Block12()
        If cboBlockTwelveChoice.Text = "Enabled" Then
            MainForm.Block12ToolStripMenuItem.Enabled = True
        End If
        If cboBlockTwelveChoice.Text = "Disabled" Then
            MainForm.Block12ToolStripMenuItem.Enabled = False
        End If
    End Sub

    Private Sub cboBlockTwelveChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockTwelveChoice.SelectedValueChanged
        Block12()
    End Sub

    Private Sub cboBlockElevenChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockElevenChoice.SelectedValueChanged
        Block11()
    End Sub

    Private Sub cboBlockTenChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockTenChoice.SelectedValueChanged
        Block10()
    End Sub

    Private Sub cboBlockNineChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockNineChoice.SelectedValueChanged
        Block9()
    End Sub

    Private Sub cboBlockEightChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockEightChoice.SelectedValueChanged
        Block8()
    End Sub

    Private Sub cboBlockSevenChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockSevenChoice.SelectedValueChanged
        Block7()
    End Sub

    Private Sub cboBlockSixChoice_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockSixChoice.SelectedIndexChanged
        Block6()
    End Sub

    Private Sub cboBlockFiveChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockFiveChoice.SelectedValueChanged
        Block5()
    End Sub

    Private Sub cboBlockFourChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockFourChoice.SelectedValueChanged
        Block4()
    End Sub

    Private Sub cboBlockThreeChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockThreeChoice.SelectedValueChanged
        Block3()
    End Sub

    Private Sub cboBlockTwoChoice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlockTwoChoice.SelectedValueChanged
        Block2()
    End Sub

    Private Sub cboBlock1Choice_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBlock1Choice.SelectedValueChanged
        Block1()
    End Sub

    Private Sub Admin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim password As String
        Dim password2 As String

        password = InputBox("Password: ", "Enter Administrator Password")
        password2 = "test"

        If password = password2 Then
            Me.Show()
        Else
            MsgBox("Wrong password entered")
            Me.Close()
        End If

    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim password As String
        Dim password2 As String

        password = InputBox("Password: ", "Enter Advanced Password")
        password2 = "airfieldadmin"

        If password = password2 Then
            'Advanced.Show()
        Else
            MsgBox("Wrong password entered")
            Me.Close()
        End If
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        HomeworkCheck.Show()
    End Sub
End Class